import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bilibili_class/navigator/fw_navigator.dart';

class DemoHomePage extends StatefulWidget {
  VoidCallback onToTarget;
  DemoHomePage({Key? key, required this.onToTarget}) : super(key: key);

  @override
  State<DemoHomePage> createState() => _DemoHomePageState();
}

class _DemoHomePageState extends State<DemoHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Container(
        child: Column(
          children: [
            Text("主页"),
            MaterialButton(
              onPressed: () {
                FwNavigator.getInstance().onJumpTo(RouteStatus.target);
              },
              child: Text("跳转"),
            )
          ],
        ),
      ),
    );
  }
}
